package com.triones.api.controller.web;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.page.TableDataInfo;
import com.triones.api.entity.vo.CustomEmailChangeRecordVO;
import com.triones.api.service.EmailChangeRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 邮箱更换记录
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/system/emailChg")
public class EmailChangeRecordController extends BaseController {

    private final EmailChangeRecordService emailChangeRecordService;

    /**
     * 邮箱变更列表（分页）
     */
    @SaCheckPermission("system:emailChange:list")
    @GetMapping("/list")
    public TableDataInfo<CustomEmailChangeRecordVO> pageList(String keyword, PageQuery pageQuery) {
        return emailChangeRecordService.pageList(keyword, pageQuery);
    }
}
